package jianyongjie.controller;

import cn.jianyongjie.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
* @Description: TODO
* @Author: JianYongJie
* @Version: 1.0
* @Date:  2022/5/30 14:41
*/
@RestController
public class UserController {

    @Value("${server.port}")
    private int port;

    @GetMapping("/userById/{id}")
    public User userById(@PathVariable("id") Long id){
        return new User(id,"刘备",port);
    }
}
